package com.ruoyi.system.api;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteQYContactFallbackFactory;
import com.ruoyi.system.api.factory.RemoteQYLoginFallbackFactory;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;

/**
 * 企业微信接口
 *
 * @author ruoyi
 */
@FeignClient(contextId = "remoteQYContactService",url = "${go_wx_url}", fallbackFactory = RemoteQYContactFallbackFactory.class)
public interface RemoteQYContactService
{
    /**
     * 同步联系人
     */
    @PostMapping(value = "/contact/sync_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String sync_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     * 同步申请好友列表
     */
    @PostMapping(value = "/contact/sync_apply_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String sync_apply_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
  /**
     * 批量获取用户信息
     */
    @PostMapping(value = "/contact/batch_get_userinfo", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String batch_get_userinfo(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

  /**
     * 批量获取公司信息
     */
    @PostMapping(value = "/contact/batch_get_corpinfo", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String batch_get_corpinfo(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
 /**
     *更新联系人
     */
    @PostMapping(value = "/contact/update_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String update_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
 /**
     *搜索微信/企微用户
     */
    @PostMapping(value = "/contact/search_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String search_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *添加搜索的微信用户
     */
    @PostMapping(value = "/contact/add_search_wx_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String add_search_wx_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *添加搜索的企微用户
     */
    @PostMapping(value = "/contact/add_search_wx_work_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String add_search_wx_work_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *添加名片为联系人
     */
    @PostMapping(value = "/contact/add_card_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String add_card_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *通过二维码名片添加微信用户
     */
    @PostMapping(value = "/contact/add_wx_card_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String add_wx_card_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *添加被对方的删除联系人
     */
    @PostMapping(value = "/contact/add_deleted_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String add_deleted_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *同意联系人申请
     */
    @PostMapping(value = "/contact/agree_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String agree_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *删除联系人
     */
    @PostMapping(value = "/contact/delete_contact", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String delete_contact(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *通过二维码获取联系人
     */
    @PostMapping(value = "/contact/get_contact_by_qrcode", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String get_contact_by_qrcode(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *操作黑名单
     */
    @PostMapping(value = "/contact/op_black_list", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String op_black_list(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);


}
